{if $arrComment}
<div class="comment">
    <ul>
        {loop $arrComment $key $item}


        <li class="clearfix" id="l_{$item[commentid]}">
            <div class="user-face">
                <a href="{tsUrl('user','space',array('id'=>$item['user']['userid']))}"><img class="rounded-circle border" title="{$item['user']['username']}" alt="{$item['user']['username']}" src="{$item['user']['face']}" width="32" height="32" /></a>
            </div>

            <div class="reply-doc">
                <h4>

                    <a class="fs14 c9" href="{tsUrl('user','space',array('id'=>$item['user']['userid']))}">{$item['user']['username']}</a>

                    {if $item['iszz']}
                    <span class="text-danger">作者</span>
                    {/if}

                    <span class="ml-3">{php echo date('Y-m-d H:i:s',$item['addtime'])}</span>

                    <i>$item['l']#</i>
                </h4>
 

                <div class="fs14">
                   
                    {if $item['ispublic'] && $item['userid']!=$TS_USER['userid'] && $item['zzuid']!=$TS_USER['userid']}
                    <div class="alert alert-warning" role="alert"> 评论内容不公开显示！</div>
                    {else}

                        {if $item['isaudit']==1}
                        内容审核中...
                        {else}
                        {$item['content']}
                        {/if}

                    

                    <div id="recomment_{$item['commentid']}">
                        {if $item['recomment']}
                        {loop $item['recomment'] $rkey $ritem}
                        <div class="recomment">

                            <div>
                                <a href="{tsUrl('user','space',array('id'=>$ritem['user']['userid']))}"><img src="{$ritem['user']['face']}" width="24" height="24" class="rounded-circle"></a>
                                <a class="c9" href="{tsUrl('user','space',array('id'=>$ritem['user']['userid']))}">{$ritem['user']['username']}</a>

                                {if $ritem['iszz']}
                                <span class="text-danger">作者</span>
                                {/if}

                                <span class="c9 ml-3">{$ritem['datetime']}</span>

                                <span class="float-right">
                                    
                                    {if $TS_USER['userid'] && $ritem['userid']!=$TS_USER['userid']}
                                    <a href="javascript:void('0');" onclick="commentOpen({$ritem['commentid']})">回复</a>
                                    {/if}

                                    {if $TS_USER['userid'] && $ritem['userid']==$TS_USER['userid']}
                                    <a class="fs12 ml-2" href="{SITE_URL}index.php?app=comment&ac=delete&commentid={$ritem['commentid']}" onClick="return confirm('确定删除吗?')">删除</a>
                                    {/if}


                                </span>

                            </div>

                            <div style="padding-left:30px;">
                                {if $ritem['touserid']}
                                <span class="text-black-50">回复 <a target="_blank" class="text-info" href="{tsUrl('user','space',array('id'=>$ritem['touserid']))}">@{$ritem['touser']['username']}</a> ：</span>
                                {/if}

                                {if $ritem['isaudit']==1}
                                内容审核中...
                                {else}
                                {$ritem['content']}
                                {/if}

                            </div>
                            <!----回复的回复---->
                            <div class="mb-2" id="rcomment_{$ritem['commentid']}" style="padding-left:30px;display:none">
                                <textarea class="form-control-sm w-100 border border-secondary" id="recontent_{$ritem['commentid']}" type="text" ></textarea>

                                <div class="mt-1">
                                    <a class="btn btn-sm btn-outline-info" href="javascript:void(0);" onClick="recomment('{$ritem[commentid]}','{$item['commentid']}','{$item[ptable]}','{$item[pkey]}',{$ritem[pid]},'{$ritem[userid]}')" id="recomm_btn_$ritem[commentid]">提交</a>
                                    <a class="btn btn-sm btn-outline-secondary" href="javascript:void('0');" onclick="commentOpen({$ritem['commentid']})">取消</a>
                                </div>
                            </div>
                        </div>
                        {/loop}
                        {/if}

                        {if $item['recomment_num']>3}
                        <div class="text-center mt-2"><a href="javascript:void('0');" onclick="loadRecomment('{$item[commentid]}','{$item[zzuid]}');">加载更多...</a></div>
                        {/if}
                    </div>
                    {/if}
                </div>

                <div class="text-right pt-2 pb-2">
                    {if $TS_USER['userid'] && $item['userid']!=$TS_USER['userid']}
                    <a class="fs12" href="javascript:void(0)"  onclick="commentOpen({$item['commentid']})">回复</a>
                    {/if}

                    {if $TS_USER['userid'] && $item['userid']==$TS_USER['userid']}
                    <a class="fs12 ml-2" href="{SITE_URL}index.php?app=comment&ac=delete&commentid={$item[commentid]}" onClick="return confirm('确定删除吗?')">删除</a>
                    {/if}
                </div>


                <div class="mb-2" id="rcomment_{$item['commentid']}" style="display:none">
                    <textarea class="form-control-sm w-100 border border-secondary" id="recontent_{$item['commentid']}" type="text"></textarea>

                    <div class="mt-1">
                        <a class="btn btn-sm btn-outline-info" href="javascript:void(0);" onClick="recomment('{$item[commentid]}','{$item[commentid]}','{$item[ptable]}','{$item[pkey]}','{$item[pid]}')" id="recomm_btn_$item[commentid]">提交</a>
                        <a class="btn btn-sm btn-outline-secondary" href="javascript:void('0');" onclick="commentOpen({$item['commentid']})">取消</a>
                    </div>
                </div>


            </div>
            <div class="clear"></div>




        </li>



        {/loop}

    </ul>
</div>
<div class="page">{$pageUrl}</div>
{/if}